package entity;

import java.io.Serializable;
import java.math.BigDecimal;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author Francis
 */
@Entity
@Table(name = "model")
@NamedQueries({@NamedQuery(name = "Model.findByItemID", query = "SELECT m FROM Model m WHERE m.itemID = :itemID"), @NamedQuery(name = "Model.findByName", query = "SELECT m FROM Model m WHERE m.name = :name"), @NamedQuery(name = "Model.findByType", query = "SELECT m FROM Model m WHERE m.type = :type"), @NamedQuery(name = "Model.findByCompany", query = "SELECT m FROM Model m WHERE m.company = :company"), @NamedQuery(name = "Model.findByScale", query = "SELECT m FROM Model m WHERE m.scale = :scale"), @NamedQuery(name = "Model.findByPrice", query = "SELECT m FROM Model m WHERE m.price = :price"), @NamedQuery(name = "Model.findByDescription", query = "SELECT m FROM Model m WHERE m.description = :description"), @NamedQuery(name = "Model.findByImgeURL", query = "SELECT m FROM Model m WHERE m.imgeURL = :imgeURL"), @NamedQuery(name = "Model.findByQuantity3", query = "SELECT m FROM Model m WHERE m.quantity3 = :quantity3"), @NamedQuery(name = "Model.findByDistributionDate", query = "SELECT m FROM Model m WHERE m.distributionDate = :distributionDate")})
public class Model implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Column(name = "itemID", nullable = false)
    private Integer itemID;
    @Column(name = "name")
    private String name;
    @Column(name = "type")
    private String type;
    @Column(name = "company")
    private String company;
    @Column(name = "scale")
    private String scale;
    @Column(name = "price")
    private BigDecimal price;
    @Column(name = "description")
    private String description;
    @Column(name = "imgeURL")
    private String imgeURL;
    @Column(name = "quantity3")
    private Integer quantity3;
    @Column(name = "distributionDate")
    private String distributionDate;

    public Model() {
    }

    public Model(Integer itemID) {
        this.itemID = itemID;
    }

    public Integer getItemID() {
        return itemID;
    }

    public void setItemID(Integer itemID) {
        this.itemID = itemID;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getCompany() {
        return company;
    }

    public void setCompany(String company) {
        this.company = company;
    }

    public String getScale() {
        return scale;
    }

    public void setScale(String scale) {
        this.scale = scale;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getImgeURL() {
        return imgeURL;
    }

    public void setImgeURL(String imgeURL) {
        this.imgeURL = imgeURL;
    }

    public Integer getQuantity3() {
        return quantity3;
    }

    public void setQuantity3(Integer quantity3) {
        this.quantity3 = quantity3;
    }

    public String getDistributionDate() {
        return distributionDate;
    }

    public void setDistributionDate(String distributionDate) {
        this.distributionDate = distributionDate;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (itemID != null ? itemID.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Model)) {
            return false;
        }
        Model other = (Model) object;
        if ((this.itemID == null && other.itemID != null) || (this.itemID != null && !this.itemID.equals(other.itemID))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "Entity.Model[itemID=" + itemID + "]";
    }

}
